{% extends "common/base.side.html" %}

{% block title %}
    Add Grade
{% endblock %}

{% block rcontent %}
    <div class="btn-toolbar">
        <div class="btn-group">
            {% url "addgradeurl" as theaddgradeurl %}
            <a class="btn btn-default {%if request.path == theaddgradeurl%} active {%endif%}"
               href={{ theaddgradeurl }}><span class="glyphicon glyphicon-edit"></span>添加评分选项</a>
            {% url "listgradeurl" as thelistgradeurl %}
            <a class="btn btn-default {%if request.path == thelistgradeurl%} active {%endif%}"
               href={{ thelistgradeurl }}><span class="glyphicon glyphicon-list"></span>评分列表</a>
        </div>
    </div>

    <hr/>

    <form class="form-horizontal" role="form" action={% url "addgradeurl" %} method="POST" >
    {% csrf_token %}
        {% for item in form %}
            <div class="form-group">
                <label class="control-label col-md-1">{{item.label}}</label>
                <div class="col-md-2">
                    {{item}}
                </div>
                <div class="col-md-offset-1 col-md-10">
                    {{item.errors}}
                </div>
            </div>
        {% endfor %}

        <div class="form-group">
            <div class="col-md-offset-1 col-md-10">
                <button type="submit" class="btn btn-danger btn-sm">新 增</button>
            <div>
        </div>
    </form>
{% endblock %}
